x86: avoid flush IPI when possible
authorJan Beulich <jbeulich@suse.com>
Thu, 18 Feb 2016 14:02:16 +0000 (15:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 18 Feb 2016 14:02:16 +0000 (15:02 +0100)
commit216a082b10a7c0e40757a6aad075e0cb4f080c7b
tree80f4e839067b9eaf60c8005f7e8b219529bd77e9
parent7c479883b04a8200fa3490ab2915b875fc4009f1
x86: avoid flush IPI when possible

Since CLFLUSH, other than WBINVD, is a cache coherency domain wide
flush, there's no need to IPI other CPUs if this is the only flushing
being requested. (As a secondary change, move a local variable into the
scope where it's actually needed.)

As a secondary change also eliminate another leftover from 32-bit days:
invalidate_interrupt() can clear FLUSH_TLB_GLOBAL alongside FLUSH_TLB,
since write_ptbase() (as a descendant of __sync_local_execstate()) now
unconditionally fiddles with CR4.PGE.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/flushtlb.c
xen/arch/x86/smp.c
xen/include/asm-x86/flushtlb.h